<?php
require_once('BaseDAO.php');

class UserFeedDAO extends BaseDAO
{
    public function getUserFeeds($userId)
    {
        return $this->executeQuery("SELECT f.*, u.DatabaseName FROM xml_feed f
        LEFT JOIN user_database u ON u.Id = f.DatabaseId WHERE f.UserId = '$userId'");
    }

    public function getActions($userId)
    {
        return $this->executeQuery("SELECT * FROM action WHERE UserId = '$userId' OR UserId IS NULL");
    }
}

?>